#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,ssse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <stack>
#include <vector>
#include<chrono>
#include <set>
#include <algorithm>
#include <iomanip>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pli pair<ll,int>
#define ls rt<<1
#define rs rt<<1|1
#define fi first
#define se second
#define ll long long
#define ull unsigned long long
#define Inf 0x3f3f3f3f
#define debug(a) cout<<#a<<"="<<a<<"\n"
using namespace std;
inline void ckmin(int& a,int b){if(a>b) a=b;}
inline void ckmax(int& a,int b){if(a<b) a=b;}
const int mod=1000;
const int maxn=2e5+5;
const double pi=acos(-1.0);
int n,m,x;
ll v[maxn];
char s[65];
int p[65];
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
unordered_map<ll,int>mp;
int main()
{
	int T;
	scanf("%d%d%d",&n,&m,&x);
	for(int i=1;i<=n;i++){
		scanf("%s",s);
		for(int j=0;j<m;j++){
			v[i]+=(s[j]=='1')*(1ll<<j);
			p[j]+=s[j]=='1';
		}
	}
	for(int j=0;j<m;j++){
		if(p[j]*2<n){
			for(int i=1;i<=n;i++){
				if(v[i]>>j&1ll) v[i]-=(1ll<<j);
			}
		}
	}
	sort(v+1,v+n+1);

	for(int l=1,r;l<=n;l=r+1){
		r=l;
		while(r<n&&v[r+1]==v[l]) ++r;
		for(ll x=v[l];x;x=(x-1)&v[l]){
			mp[x]+=r-l+1;
		}
	}
	ll ans=0;
	int mx=0;
	for(pli i:mp){
		if(i.se*2<n) continue;
		int res=__builtin_popcountll(i.fi);
		if(res>mx) mx=res,ans=i.fi;
	}
	for(int i=0;i<m;i++){
		printf("%d",ans>>i&1);
	}
	return 0;
}
